package edu.sctu.practice.class02.luohui.assign03;

/**
 * Created by asus on 2015/10/8.
 */
public class Mainfunction {
    public static void main(String[] args) {
        Rational rationalOne=new Rational(16,4);
        Rational rationalTwo=new Rational(24,3);

        System.out.println("加法运算的结果为："+rationalOne.add());
        System.out.println("减法运算的结果为："+rationalOne.subtract());
        System.out.println("乘法运算的结果为："+rationalOne.multiply());
        System.out.println("除法运算的结果为："+rationalOne.devide());

        System.out.println("加法运算的结果为："+rationalTwo.add());
        System.out.println("减法运算的结果为："+rationalTwo.subtract());
        System.out.println("乘法运算的结果为："+rationalTwo.multiply());
        System.out.println("除法运算的结果为："+rationalTwo.devide());

    }
}
